package cn.itcast.service;

import cn.itcast.dao.ConsumerDao;
import cn.itcast.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class ConsumerService {
    @Autowired
    private ConsumerDao consumerDao;

    public List<User> queryUserByIds(List<Long> ids) {
        List<User> list=new ArrayList<>();
        for (Long id : ids) {
            User user=consumerDao.queryUserById(id);
            list.add(user);
        }
        return list;
    }
}
